Skip to content

feat: 피드 랭킹 좋아요·조회수 가중치 변경#406

Merged
KoSeonJe merged 2 commits intodevelopfrom
feat/change-weight
Mar 2, 2026
Merged

feat: 피드 랭킹 좋아요·조회수 가중치 변경#406
KoSeonJe merged 2 commits intodevelopfrom
feat/change-weight

Conversation

@KoSeonJe
Copy link
Copy Markdown
Collaborator

@KoSeonJe KoSeonJe commented Mar 2, 2026

🚀 작업 내용

  • 피드 랭킹 점수 계산 시 조회수와 좋아요의 가중치를 변경했습니다
    • 조회수 가중치: 1 → 3
    • 좋아요 가중치: 3 → 1
  • 변경된 가중치에 맞게 테스트 기대값을 수정했습니다

🤔 고민했던 내용

  • 조회수가 좋아요보다 랭킹에 더 큰 영향을 미치도록 가중치를 조정했습니다

💬 리뷰 중점사항

  • 가중치 상수 값 변경이 의도에 맞는지 확인 부탁드립니다

🤖 Generated with Claude Code

Summary by CodeRabbit

릴리스 노트

  • 기능 개선
    • 피드 랭킹 계산에서 조회수의 가중치가 증가하고(기존보다 더 큰 영향), 좋아요의 가중치는 감소했습니다. 이 변경으로 피드 점수와 순위가 일부 달라질 수 있습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 2, 2026

Walkthrough

피드 순위 산정 가중치 교체: VIEW_WEIGHT 를 1→3, LIKE_WEIGHT 를 3→1로 변경하여 점수 계산과 관련 테스트들의 기대값이 업데이트됨.

Changes

Cohort / File(s) Summary
Feed Ranking Service Core
src/main/java/ddingdong/ddingdongBE/domain/feed/service/GeneralFeedRankingService.java
가중치 상수 변경: VIEW_WEIGHT 1→3, LIKE_WEIGHT 3→1. calculateScore 및 총점 산출에 사용되는 상수 값만 변경됨.
Feed Controller & Service Tests
src/test/java/ddingdong/ddingdongBE/domain/feed/controller/AdminFeedControllerE2ETest.java, src/test/java/ddingdong/ddingdongBE/domain/feed/controller/ClubFeedStatusE2ETest.java, src/test/java/ddingdong/ddingdongBE/domain/feed/service/GeneralFeedRankingServiceTest.java
가중치 변경에 따라 viewScore/likeScore 및 totalScore에 대한 기대값(주석/assertion) 업데이트. 순위 기대는 유지됨.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

D-3

Suggested reviewers

  • wonjunYou
  • 5uhwann
  • Seooooo24
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경사항을 명확하게 요약하고 있습니다. 피드 랭킹의 가중치 변경이라는 핵심 내용을 간결하게 표현했습니다.
Description check ✅ Passed PR 설명이 제공된 템플릿의 모든 필수 섹션(작업 내용, 고민했던 내용, 리뷰 중점사항)을 포함하고 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/change-weight

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KoSeonJe KoSeonJe changed the title refactor: 피드 랭킹 좋아요·조회수 가중치 변경 feat: 피드 랭킹 좋아요·조회수 가중치 변경 Mar 2, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/test/java/ddingdong/ddingdongBE/domain/feed/controller/ClubFeedStatusE2ETest.java (1)

83-103: 조회수 가중치 회귀를 직접 검증하는 단언을 추가하면 더 안전합니다.

현재 시나리오는 viewCount=0이라 VIEW_WEIGHT 변경(1→3)이 결과에 영향이 없어 회귀 탐지가 약합니다. viewScore 단언을 추가하거나 조회수 > 0 케이스를 별도 테스트로 두는 것을 권장합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/test/java/ddingdong/ddingdongBE/domain/feed/controller/ClubFeedStatusE2ETest.java`
around lines 83 - 103, Add an assertion to verify the viewScore (or add a
separate test case where viewCount > 0) so view-weight regressions are caught:
in ClubFeedStatusE2ETest, after extracting response from the GET
"/server/central/feeds/status" (response variable), assert the numeric value of
response.get("viewScore") (cast via ((Number)
response.get("viewScore")).longValue()) equals the expected viewScore for the
prepared feed data; alternatively create a new test that creates a feed with
viewCount > 0 and asserts feedScore/likeScore/commentScore/viewScore/totalScore
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@src/test/java/ddingdong/ddingdongBE/domain/feed/controller/ClubFeedStatusE2ETest.java`:
- Around line 83-103: Add an assertion to verify the viewScore (or add a
separate test case where viewCount > 0) so view-weight regressions are caught:
in ClubFeedStatusE2ETest, after extracting response from the GET
"/server/central/feeds/status" (response variable), assert the numeric value of
response.get("viewScore") (cast via ((Number)
response.get("viewScore")).longValue()) equals the expected viewScore for the
prepared feed data; alternatively create a new test that creates a feed with
viewCount > 0 and asserts feedScore/likeScore/commentScore/viewScore/totalScore
accordingly.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e999d2 and a331327.

📒 Files selected for processing (1)
  • src/test/java/ddingdong/ddingdongBE/domain/feed/controller/ClubFeedStatusE2ETest.java

@KoSeonJe KoSeonJe merged commit 4dde8d9 into develop Mar 2, 2026
2 checks passed
@KoSeonJe KoSeonJe deleted the feat/change-weight branch March 2, 2026 18:08
@KoSeonJe KoSeonJe self-assigned this Mar 3, 2026
KoSeonJe added a commit that referenced this pull request Mar 16, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@KoSeonJe KoSeonJe mentioned this pull request Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant